package com.guoxin.part4.chapter17;

/**
 * Lock接口定义
 *
 * @author guoxin
 */
public interface Lock {
    /**
     * 获取显示锁，没有获得锁的线程将被阻塞
     *
     * @throws InterruptedException InterruptedException
     */
    void lock() throws InterruptedException;

    /**
     * 释放获取的锁
     */
    void unlock();

}
